<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 addon_domains_setup_redirect.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
include $root_path.'common.php';
$page_title = $lang['addon_domains'];
include $root_path.'page_header.php';


$template->set_filenames(array(
	'body' => $root_path.$template_path.'domains/addon_domains_setup_redirect.tpl')
);

$domain = <<<EOFpacman
<cpanel print="$FORM{'domain'}">
EOFpacman;

$temp = explode(',', $domain);
$domain_name = $temp[0];
$subdomain_name = $temp[1];

$redirect_domain = <<<EOFpacman
<cpanel SubDomain="subdomainurl($FORM{'domain'})">
EOFpacman;

// If the redirect is currently not set, then say so - don't just output http:// !
if ($redirect_domain == "http://") {
	$s_subdomain_url = $redirect_domain;
	$redirect_domain = "nowhere";
} else {
	$s_subdomain_url = $redirect_domain;
};

$template->assign_vars(array(
	'U_ACTION' => 'addon_domains_setup_redirect_done.php',
	'ADDON_DOMAIN' => $domain_name,
	'SUBDOMAIN' => $subdomain_name,
	'REDIRECT_DOMAIN' => $redirect_domain,

	'S_REDIRECT_DOMAIN' => $s_subdomain_url,
	
	'L_ADDON_DOMAINS' => $lang['addon_domains'],
	'L_DESCRIPTION' => sprintf($lang['addon_domains_redirect_descr'], $domain_name, $redirect_domain),
	'L_URL' => $lang['url'],
	'L_HINT' => sprintf($lang['addon_domains_redirect_hint'], $domain_name),
	'L_SETUP_REDIRECT' => $lang['setup_redirect'],
	)
);

//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>